import request from '@/utils/request'

// 获取 - 权限点列表
export function getPermissionList(params) {
  return request({
    url: '/sys/permission',
    method: 'get',
    params
  })
}

// 新增 - 权限点
export function postPermissionList(data) {
  return request({
    url: '/sys/permission',
    method: 'POST',
    data
  })
}
// 获取 - 权限点详情
export function getappList(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'get',
    id
  })
}

// 修改-权限点详情
export function putPermissionList(data) {
  return request({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data
  })
}

// 删除权限点
export function delPermissionList(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'DELETE',
    id
  })
}
